package com.fanxuankai.boot.log.config;

import com.alibaba.fastjson.JSONObject;
import com.fanxuankai.boot.log.JsonFilter;
import org.springframework.stereotype.Component;

/**
 * @author fanxuankai
 */
@Component
public class MyJsonFilter implements JsonFilter {
    @Override
    public void doFilter(JSONObject jsonObject) {
        if (jsonObject.get("password") != null) {
            jsonObject.put("password", "xxx");
        }
    }
}
